Skip to content

[Constant Evaluator] Add support for BinaryInteger.description which converts an integer to a string#29501

Merged
ravikandhadai merged 1 commit into
swiftlang:masterfrom
ravikandhadai:constexpr-binary-integer-description
Jan 28, 2020
Merged

[Constant Evaluator] Add support for BinaryInteger.description which converts an integer to a string#29501
ravikandhadai merged 1 commit into
swiftlang:masterfrom
ravikandhadai:constexpr-binary-integer-description

Conversation

@ravikandhadai
Copy link
Copy Markdown
Contributor

This patch adds an @_semantics annotation to the BinaryInteger.description function.

converts an integer to a string. This patch adds a @_semantics
annotation to the BinaryInteger.description function.
@ravikandhadai
Copy link
Copy Markdown
Contributor Author

ravikandhadai commented Jan 28, 2020

@eeckstein this PR adds an @_semantics annotation to the BinaryInteger.description stdlib function so that it can be modeled in the constant evaluator.

@ravikandhadai
Copy link
Copy Markdown
Contributor Author

@swift-ci Please test

@ravikandhadai
Copy link
Copy Markdown
Contributor Author

@swift-ci Please benchmark

@swift-ci
Copy link
Copy Markdown
Contributor

Performance: -O

Regression OLD NEW DELTA RATIO
ObjectiveCBridgeFromNSArrayAnyObjectForced 4860 5240 +7.8% 0.93x (?)
 
Improvement OLD NEW DELTA RATIO
FlattenListFlatMap 9776 9110 -6.8% 1.07x (?)
NSStringConversion.UTF8 825 771 -6.5% 1.07x (?)

Code size: -O

Performance: -Osize

Regression OLD NEW DELTA RATIO
ObjectiveCBridgeStubFromNSDateRef 3710 4110 +10.8% 0.90x (?)
NSStringConversion.UTF8 765 828 +8.2% 0.92x (?)
 
Improvement OLD NEW DELTA RATIO
ObjectiveCBridgeFromNSSetAnyObjectToString 79500 72000 -9.4% 1.10x (?)

Code size: -Osize

Performance: -Onone

Code size: -swiftlibs

How to read the data The tables contain differences in performance which are larger than 8% and differences in code size which are larger than 1%.

If you see any unexpected regressions, you should consider fixing the
regressions before you merge the PR.

Noise: Sometimes the performance results (not code size!) contain false
alarms. Unexpected regressions which are marked with '(?)' are probably noise.
If you see regressions which you cannot explain you can try to run the
benchmarks again. If regressions still show up, please consult with the
performance team (@eeckstein).

Hardware Overview
  Model Name: Mac Pro
  Model Identifier: MacPro6,1
  Processor Name: 12-Core Intel Xeon E5
  Processor Speed: 2.7 GHz
  Number of Processors: 1
  Total Number of Cores: 12
  L2 Cache (per Core): 256 KB
  L3 Cache: 30 MB
  Memory: 64 GB

Copy link
Copy Markdown
Contributor

@eeckstein eeckstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ravikandhadai ravikandhadai merged commit 566d574 into swiftlang:master Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants